Skip to content

test: cover resumed plan state with empty plan - #2284

Open
xianjianlf2 wants to merge 1 commit into
MoonshotAI:mainfrom
xianjianlf2:markxian/test-resumed-plan-state
Open

test: cover resumed plan state with empty plan#2284
xianjianlf2 wants to merge 1 commit into
MoonshotAI:mainfrom
xianjianlf2:markxian/test-resumed-plan-state

Conversation

@xianjianlf2

@xianjianlf2 xianjianlf2 commented Jul 28, 2026

Copy link
Copy Markdown

Related Issue

No linked issue.

Problem

The resumed-plan path had no direct regression test for the empty restored plan state.

What changed

Converted the todo into a real test that asserts resumed plan mode stays active and the restored empty plan is still exposed through the public session APIs. No changeset is needed because this is test-only.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e696779

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e696779287

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

});

it.todo('marks resumed plan mode active when the restored plan has no plan data', async () => {
it('marks resumed plan mode active when the restored plan has no plan data', async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix the fixture before enabling this legacy resume test

This test now runs, but it never creates the advertised “restored plan has no plan data” state: the session setup calls setPlanMode(true), which currently writes a plan_mode.enter record with an id (packages/agent-core/src/agent/plan/index.ts:39), while removeManualPlanIds only removes/edits plan.enter and plan.manual_enter records. As a result, the wire history still contains the normal plan id and this test largely duplicates the preceding resume test instead of covering the legacy/missing-plan-data path; update the fixture to strip plan_mode.enter’s id or seed an actual legacy record before enabling it.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant